package Algorithms.DynamicPrograming_03;

/*
 * @Author 罗
 * @date 2020/3/29 - 2:50 下午
 *
 */

public class test {

    public static void main(String[] args) {
        Item[] items = {
                /*
                * 添加一个null物品，使得商品表能和另外一个动态规划表匹配下标
                * 就不用-1了
                * */
                new Item(),
                new Item(1, "吉他", 1, 1500),
                new Item(2, "音响", 4, 3000),
                new Item(3, "电脑", 3, 2000)
        };
        int[][] dynamicProgramingTable = DynamicPrograming.dynamicPrograming(items, 4);

        for (int[] ints : dynamicProgramingTable) {
            for (int anInt : ints) {
                System.out.print(anInt+"\t");
            }
            System.out.println();
        }
    }
}
